Win32: Honor the geometry when GDK_HINT_MAX_SIZE is set.
authorCody Russell <cody@jhu.edu>
Thu, 31 Oct 2013 20:54:28 +0000 (15:54 -0500)
committerCody Russell <cody@jhu.edu>
Thu, 31 Oct 2013 20:54:28 +0000 (15:54 -0500)
The MINMAXINFO struct was being populated based upon geometry hints when
GDK_HINT_MAX_SIZE flag was enabled, then promptly having its values blown
away with default values.

https://bugzilla.gnome.org/show_bug.cgi?id=711110

gdk/win32/gdkevents-win32.c

index 31eb5120ad0785464be3b22639fe1c19f6129d92..e7524d0bc8416c18ad91feda336f38ae26b902b4 100644 (file)
@@ -3074,6 +3074,11 @@ gdk_event_translate (MSG  *msg,
          mmi->ptMaxTrackSize.x = maxw > 0 && maxw < G_MAXSHORT ? maxw : G_MAXSHORT;
          mmi->ptMaxTrackSize.y = maxh > 0 && maxh < G_MAXSHORT ? maxh : G_MAXSHORT;
        }
+      else
+       {
+         mmi->ptMaxTrackSize.x = 30000;
+         mmi->ptMaxTrackSize.y = 30000;
+       }
 
       if (impl->hint_flags & (GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE))
        {
@@ -3086,8 +3091,7 @@ gdk_event_translate (MSG  *msg,
                                     mmi->ptMaxSize.x, mmi->ptMaxSize.y));
          return_val = TRUE;
        }
-      mmi->ptMaxTrackSize.x = 30000;
-      mmi->ptMaxTrackSize.y = 30000;
+
       return_val = TRUE;
       break;